package com.example.fmgidsprototype;

import java.net.URL;
import java.net.URLConnection;

import android.os.AsyncTask;

public class JsonLastModifiedCheck extends AsyncTask<String, Void, Long>{
	
	private long remoteTimeStamp;

	@Override
	protected Long doInBackground(String... params) {
		remoteTimeStamp = 0L;
		URLConnection conn = null;
		String urlString = params[0];
		try{
			URL url = new URL(urlString);
			conn = url.openConnection();
			remoteTimeStamp = conn.getLastModified();
		}
		catch(Exception e){	
		}
		return remoteTimeStamp;
	}
	
	public Long getRemoteTimeStamp(){
		return remoteTimeStamp;
	}
	

}
